package com.lson.kafka.stream.controller;

import com.lson.kafka.stream.service.StreamProducerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("streamProducer")
public class StreamProducerController {

    @Autowired
    StreamProducerService streamProducerService;
    @RequestMapping("/sendMsg")
    public String sendMsg(String status,String id){
        for (int i = 0; i < 100000; i++) {
            streamProducerService.sendMsg(status,id);
        }
        return "success";
    }
}
